package com.heima.user.feign;


import com.heima.common.dtos.ResponseResult;
import com.heima.model.behavior.dtos.ArticleUserInfoDto;
import com.heima.model.user.pojos.ApUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-user")
public interface ApUserFeign {

    @GetMapping("/api/v1/login/findById/{id}")
    public ResponseResult<ApUser> findById(@PathVariable Integer id);


    /**
     * 查询用户是否关注文章
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/user_follow")
    public Boolean userIsFollew(@RequestBody ArticleUserInfoDto dto);
}
